package com.heima.user.controller.v1;

import com.heima.api.user.ApUserControllerApi;
import com.heima.model.user.pojos.ApUser;
import com.heima.user.service.ApUserService;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/v1/user")
public class ApUserController implements ApUserControllerApi {

    @Resource
    private ApUserService apUserService;

    /**
     * @param id 用户id
     * @return 查询结果
     * @Description 根据id查询app端用户信息
     */
    @GetMapping("/{id}")
    @Override
    public ApUser findUserById(@PathVariable("id") Integer id) {
        return apUserService.getById(id);
    }
}